<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>结构伪类选择器</title>
    <style>
        li:first-child{
            background: yellow;
        }
        li:last-child{
            background: red;
        }
        /* 第几个 */
        li:nth-child(2){
            background: blue;
        }
        /* 偶数个 2n或者even */
        li:nth-child(2n){
            color: rgb(0, 255, 200);
        }
        /* 奇数个 2n-1或者odd*/
        li:nth-child(odd){
            color: rgb(252, 125, 7);
        }
    </style>
</head>
<body>
   <ul>
        <li>11111</li>
        <li>22222</li>
        <li>33333</li>
        <li>44444</li>
        <li>55555</li>
   </ul>
</body>
</html>